﻿using UnityEngine;
using System.Collections;

public class TestSpawner : MonoBehaviour {
	public Transform ship;
	private int spawnX;
	private int spawnY;
	private Vector3 spawnLocation;
	// Use this for initialization
	void Start () {
		spawnX = Random.Range (-5, 5);
		spawnY = Random.Range (-5, 5);
		spawnLocation = new Vector3 (spawnX, spawnY, -9);

	}
	
	// Update is called once per frame
	void Update () {
		if(Input.GetKeyDown(KeyCode.P)){
			Instantiate(ship, spawnLocation, ship.rotation);
		}
	}
}
